<?php

namespace app\admin\model;
use think\Model;
use think\Request;

class PayLog extends Model { 
    protected $auto = ['admin_id'=>UID];
    
    protected function setHoursAttr()
    {
        $hours = Request::instance()->param('hours');
        $pay_type = Request::instance()->param('hour_type');
        return $pay_type === '0' ? 0-$hours : $hours;
    }
}